A “virtual machine” or a “VM” refers to a specific software-based implementation of a machine in a virtualization environment, in which the hardware resources of a real computer (e.g., CPU, memory, etc.) are virtualized or transformed into the underlying support for the fully functional virtual machine that can run its own operating system and applications on the underlying physical resources just like a real computer.
Virtualization works by inserting a thin layer of software directly on the computer hardware or on a host operating system. This layer of software contains a virtual machine monitor or “hypervisor” that allocates hardware resources dynamically and transparently. Multiple operating systems run concurrently on a single physical computer and share hardware resources with each other. By encapsulating an entire machine, including CPU, memory, operating system, and network devices, a virtual machine is completely compatible with most standard operating systems, applications, and device drivers. Most modern implementations allow several operating systems and applications to safely run at the same time on a single computer, with each having access to the resources it needs when it needs them.
Virtualization allows one to run multiple virtual machines on a single physical machine, with each virtual machine sharing the resources of that one physical computer across multiple environments. Different virtual machines can run different operating systems and multiple applications on the same physical computer.
One reason for the broad adoption of virtualization in modern business and computing environments is because of the resource utilization advantages provided by virtual machines. Without virtualization, if a physical machine is limited to a single dedicated operating system, then during periods of inactivity by the dedicated operating system the physical machine is not utilized to perform useful work. This is wasteful and inefficient if there are users on other physical machines which are currently waiting for computing resources. To address this problem, virtualization allows multiple VMs to share the underlying physical resources so that during periods of inactivity by one VM, other VMs can take advantage of the resource availability to process workloads. This can produce great efficiencies for the utilization of physical devices, and can result in reduced redundancies and better resource cost management.
Virtualization environments may be implemented to perform I/O and storage device management. One type of architecture for managing I/O and storage for a virtualization environment is described in application Ser. No. 13/207,345. This architecture employs a service VM that sits above the hypervisor to control and manage any type of storage device, including direct-attached storage in addition to network-attached and cloud-attached storage. The term service VM may also be referred to herein as Controller VM. The Service VM implements the Storage Controller logic in the user space, and with the help of other Service VMs in a cluster, virtualizes all storage hardware as one global resource pool that is high in reliability, availability, and performance. IP-based requests are used to send I/O request to the Service VMs. The Service VM can directly implement storage and I/O optimizations within the direct data access path, without the need for add-on products.
When a storage device needs to be replaced while the virtualization environment is still in operation, issues may arise leading to the inoperability of the virtualization environment. Replacing a storage device while the virtualization environment is still in operation is known as “hot-swapping”. Hot-swapping a storage device may be necessary when the storage device incurs an error or fails for any other reason during operation of the virtualization environment. However, when a storage device is removed while the virtualization environment is still in operation, the hypervisor supporting the virtual machines of the virtualization environment may be unable to continue operating correctly causing various errors to occur leading to undesirable behavior in the virtualization environment. Because a service VM accesses the storage devices through the hypervisor, the service VM may be unable to accurately perform its I/O and storage management functions when its corresponding hypervisor begins to misbehave due to a storage device being removed while the virtualization environment is still in operation.
Therefore, there is a need for a method for performing a hot-swap of a storage device in a virtualization environment.